package com.api.mc
{
	import com.game.display.AutoGCMovieClip;
	
	import fl.controls.TextArea;
	
	import flash.display.MovieClip;
	import flash.events.MouseEvent;
	import flash.text.TextField;
	
	public class DebugTxt extends AutoGCMovieClip
	{
		public var bg:MovieClip;
		public var txt:TextArea;;
		private var _debugNum:uint=0;
	
		public function DebugTxt()
		{
			init();
		}
		private function init():void{
			bg.addEventListener(MouseEvent.MOUSE_DOWN,mouseDown);
			bg.addEventListener(MouseEvent.MOUSE_UP,mouseUp);
		}
		public function addStr(str:String):void{
			_debugNum++;
			txt.appendText(	_debugNum+":"+str+"\n\n");
			txt.verticalScrollPosition=txt.maxVerticalScrollPosition;
		}
		private function mouseDown(e:MouseEvent):void{
			this.startDrag();
		}
		private function mouseUp(e:MouseEvent):void{
			this.stopDrag();
		}
	}
}